.class public Lcom/estrongs/android/biz/cards/cardfactory/g;
.super Les/gl;
.source "CmsCardFactory.java"

# interfaces
.implements Lcom/estrongs/android/biz/cards/cardfactory/b;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/biz/cards/cardfactory/g$d;
    }
.end annotation


# static fields
.field private static f:Lcom/estrongs/android/biz/cards/cardfactory/g;


# instance fields
.field private d:Lcom/estrongs/android/biz/cards/cardfactory/g$d;

.field private e:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method private constructor <init>()V
    .locals 2

    .line 1
    sget-object v0, Les/fl;->b:Ljava/lang/String;

    const/4 v1, 0x0

    invoke-direct {p0, v0, v1}, Les/gl;-><init>(Ljava/lang/String;Z)V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/biz/cards/cardfactory/g;)Lcom/estrongs/android/biz/cards/cardfactory/g$d;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->d:Lcom/estrongs/android/biz/cards/cardfactory/g$d;

    return-object p0
.end method

.method private b(Ljava/lang/String;)Ljava/util/HashMap;
    .locals 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/util/List<",
            "Les/yg;",
            ">;>;"
        }
    .end annotation

    .line 1
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 2
    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string p1, "result_page"

    .line 3
    invoke-virtual {v1, p1}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object p1

    const/4 v1, 0x0

    const/4 v2, 0x0

    .line 4
    :goto_0
    invoke-virtual {p1}, Lorg/json/JSONArray;->length()I

    move-result v3

    if-ge v2, v3, :cond_3

    .line 5
    invoke-virtual {p1, v2}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v3

    const-string v4, "page_key"

    .line 6
    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    const-string v5, "start_time"

    .line 7
    invoke-virtual {v3, v5}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    const-string v6, "end_time"

    .line 8
    invoke-virtual {v3, v6}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    .line 9
    invoke-static {v5, v6}, Lcom/estrongs/android/biz/cards/cardfactory/e;->a(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_0

    goto :goto_3

    .line 10
    :cond_0
    new-instance v5, Ljava/util/ArrayList;

    invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V

    const-string v6, "cards"

    .line 11
    invoke-virtual {v3, v6}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v3

    const/4 v6, 0x0

    .line 12
    :goto_1
    invoke-virtual {v3}, Lorg/json/JSONArray;->length()I

    move-result v7

    if-ge v6, v7, :cond_2

    .line 13
    invoke-virtual {v3, v6}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v7

    const-string v8, "type"

    .line 14
    invoke-virtual {v7, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 15
    invoke-static {v4, v8, v7}, Lcom/estrongs/android/biz/cards/cardfactory/e;->a(Ljava/lang/String;Ljava/lang/String;Lorg/json/JSONObject;)Les/yg;

    move-result-object v7

    if-nez v7, :cond_1

    goto :goto_2

    .line 16
    :cond_1
    invoke-virtual {v7}, Les/yg;->e()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Lcom/estrongs/android/biz/cards/cardfactory/e;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 17
    invoke-virtual {v7, v8}, Les/yg;->a(Ljava/lang/String;)V

    .line 18
    invoke-interface {v5, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :goto_2
    add-int/lit8 v6, v6, 0x1

    goto :goto_1

    .line 19
    :cond_2
    new-instance v3, Lcom/estrongs/android/biz/cards/cardfactory/g$c;

    invoke-direct {v3, p0}, Lcom/estrongs/android/biz/cards/cardfactory/g$c;-><init>(Lcom/estrongs/android/biz/cards/cardfactory/g;)V

    invoke-static {v5, v3}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V

    .line 20
    invoke-virtual {v0, v4, v5}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_3
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :catch_0
    move-exception p1

    .line 21
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :cond_3
    return-object v0
.end method

.method public static h()Lcom/estrongs/android/biz/cards/cardfactory/g;
    .locals 2

    .line 1
    sget-object v0, Lcom/estrongs/android/biz/cards/cardfactory/g;->f:Lcom/estrongs/android/biz/cards/cardfactory/g;

    if-nez v0, :cond_1

    .line 2
    const-class v0, Lcom/estrongs/android/biz/cards/cardfactory/g;

    monitor-enter v0

    .line 3
    :try_start_0
    sget-object v1, Lcom/estrongs/android/biz/cards/cardfactory/g;->f:Lcom/estrongs/android/biz/cards/cardfactory/g;

    if-nez v1, :cond_0

    .line 4
    new-instance v1, Lcom/estrongs/android/biz/cards/cardfactory/g;

    invoke-direct {v1}, Lcom/estrongs/android/biz/cards/cardfactory/g;-><init>()V

    sput-object v1, Lcom/estrongs/android/biz/cards/cardfactory/g;->f:Lcom/estrongs/android/biz/cards/cardfactory/g;

    .line 5
    :cond_0
    monitor-exit v0

    goto :goto_0

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1

    .line 6
    :cond_1
    :goto_0
    sget-object v0, Lcom/estrongs/android/biz/cards/cardfactory/g;->f:Lcom/estrongs/android/biz/cards/cardfactory/g;

    return-object v0
.end method


# virtual methods
.method protected a(Ljava/lang/String;IZ)Les/ll;
    .locals 0

    .line 7
    invoke-direct {p0, p1}, Lcom/estrongs/android/biz/cards/cardfactory/g;->b(Ljava/lang/String;)Ljava/util/HashMap;

    move-result-object p1

    .line 8
    new-instance p2, Lcom/estrongs/android/biz/cards/cardfactory/g$d;

    const/4 p3, 0x0

    invoke-direct {p2, p0, p3}, Lcom/estrongs/android/biz/cards/cardfactory/g$d;-><init>(Lcom/estrongs/android/biz/cards/cardfactory/g;Lcom/estrongs/android/biz/cards/cardfactory/g$a;)V

    if-eqz p1, :cond_0

    .line 9
    invoke-virtual {p1}, Ljava/util/HashMap;->size()I

    move-result p3

    if-lez p3, :cond_0

    .line 10
    monitor-enter p0

    .line 11
    :try_start_0
    invoke-virtual {p2, p1}, Lcom/estrongs/android/biz/cards/cardfactory/g$d;->a(Ljava/util/HashMap;)V

    .line 12
    monitor-exit p0

    goto :goto_0

    :catchall_0
    move-exception p1

    monitor-exit p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1

    :cond_0
    :goto_0
    return-object p2
.end method

.method public a(Les/yg;Ljava/lang/String;)V
    .locals 0

    return-void
.end method

.method public a(Ljava/lang/String;)V
    .locals 1

    .line 16
    iget-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->e:Ljava/util/Map;

    if-eqz v0, :cond_0

    .line 17
    invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    :cond_0
    return-void
.end method

.method public a(Ljava/lang/String;Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;)V
    .locals 1

    .line 13
    iget-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->e:Ljava/util/Map;

    if-nez v0, :cond_0

    .line 14
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->e:Ljava/util/Map;

    .line 15
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->e:Ljava/util/Map;

    invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-void
.end method

.method public a(Ljava/lang/String;ZLcom/estrongs/android/biz/cards/cardfactory/j;)V
    .locals 2

    .line 2
    invoke-virtual {p0}, Les/gl;->b()Les/ll;

    move-result-object v0

    .line 3
    instance-of v1, v0, Lcom/estrongs/android/biz/cards/cardfactory/g$d;

    if-eqz v1, :cond_0

    .line 4
    check-cast v0, Lcom/estrongs/android/biz/cards/cardfactory/g$d;

    iput-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->d:Lcom/estrongs/android/biz/cards/cardfactory/g$d;

    if-eqz p3, :cond_1

    .line 5
    new-instance v0, Lcom/estrongs/android/biz/cards/cardfactory/g$a;

    invoke-direct {v0, p0, p1, p2, p3}, Lcom/estrongs/android/biz/cards/cardfactory/g$a;-><init>(Lcom/estrongs/android/biz/cards/cardfactory/g;Ljava/lang/String;ZLcom/estrongs/android/biz/cards/cardfactory/j;)V

    invoke-static {v0}, Lcom/estrongs/android/util/o;->b(Ljava/lang/Runnable;)V

    goto :goto_0

    .line 6
    :cond_0
    new-instance p1, Lcom/estrongs/android/biz/cards/cardfactory/g$b;

    invoke-direct {p1, p0, p3}, Lcom/estrongs/android/biz/cards/cardfactory/g$b;-><init>(Lcom/estrongs/android/biz/cards/cardfactory/g;Lcom/estrongs/android/biz/cards/cardfactory/j;)V

    invoke-static {p1}, Lcom/estrongs/android/util/o0;->a(Ljava/lang/Runnable;)V

    :cond_1
    :goto_0
    return-void
.end method

.method public a(Ljava/util/List;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Les/yg;",
            ">;)V"
        }
    .end annotation

    return-void
.end method

.method protected c()Ljava/lang/String;
    .locals 1

    .line 1
    invoke-static {}, Lcom/estrongs/android/biz/cards/cardfactory/f;->b()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected d()Les/ll;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->d:Lcom/estrongs/android/biz/cards/cardfactory/g$d;

    return-object v0
.end method

.method public g()V
    .locals 1

    .line 1
    monitor-enter p0

    .line 2
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->d:Lcom/estrongs/android/biz/cards/cardfactory/g$d;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->d:Lcom/estrongs/android/biz/cards/cardfactory/g$d;

    invoke-virtual {v0}, Lcom/estrongs/android/biz/cards/cardfactory/g$d;->b()Ljava/util/HashMap;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->d:Lcom/estrongs/android/biz/cards/cardfactory/g$d;

    invoke-virtual {v0}, Lcom/estrongs/android/biz/cards/cardfactory/g$d;->b()Ljava/util/HashMap;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/HashMap;->clear()V

    const/4 v0, 0x0

    .line 4
    iput-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/g;->d:Lcom/estrongs/android/biz/cards/cardfactory/g$d;

    .line 5
    :cond_0
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v0
.end method
